package com.hsgene.product.applets.goods;

import com.hsgene.common.util.exception.ErrorCode;

/**
 * 小程序ErrorCode
 *
 * @author wxf
 * @date 2018/10/11 14:59
 **/
public enum AppletsErrorCode implements ErrorCode {

    /**
     * 商品id不能为空
     */
    APPLETS_GOODS_ID_IS_NOT_NULL(80001, "APPLETS_GOODS_ID_IS_NOT_NULL", "商品id不能为空"),
    APPLETS_COMMIT_LABEL_TYPE_IS_NOT_NULL(80002, "APPLETS_COMMIT_LABEL_TYPE_IS_NOT_NULL", "评论类型不能为空"),
    APPLETS_GOODS_DETAILD_IS_ERROR(80003, "APPLETS_GOODS_DETAILD_IS_ERROR", "获取商品详情异常"),
    APPLETS_GOODS_COMMENT_IS_ERROR(80004, "APPLETS_GOODS_COMMENT_IS_ERROR", "获取商品评论异常"),
    USER_INFO_IS_NOT_NULL(80005, "APPLETS_GOODS_COMMENT_IS_ERROR", "用户信息不能为空"),
    DISCOUNT_INFO_IS_NOT_NULL(80006, "APPLETS_GOODS_COMMENT_IS_ERROR", "优惠券信息不能为空"),
    DISCOUNT_INFO_IS_EXISTS(80007, "DISCOUNT_INFO_IS_EXISTS", "优惠券已存在"),
    PRODUCTS_INFO_IS_NOT_EXISTS(80007, "PRODUCTS_INFO_IS_NOT_EXISTS", "商品不存在"),
    SIZA_IS_NOT_NULL(80007, "SIZA_IS_NOT_NULL", "页码、列表数目大小不能为空"),
    LABEL_IS_ERROR(80007, "LABEL_IS_ERROR", "标签数据异常"),
    SEND_MQ_IS_ERROR(80020, "SEND_MQ_IS_ERROR", "发送消息队列失败"),
    MQ_MESSAGE_IS_NOT_NULL(80021, "MQ_MESSAGE_IS_NOT_NULL", "发送队列消息不能为空"),
    MQ_SYSTEM_MESSAGE_IS_NOT_NULL(80023, "MQ_SYSTEM_MESSAGE_IS_NOT_NULL", "发送内容和标题不能为空"),
    MQ_MESSAGE_TAG_IS_NOT_NULL(80022, "MQ_MESSAGE_TAG_IS_NOT_NULL", "消息标签类型不能为空"),
    ADD_DISCOUNT_IS_ERROR(80008, "ADD_DISCOUNT_IS_ERROR", "优惠券领取异常");

    private final int code;

    private final String message;

    private final String description;

    AppletsErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
